package com.alibaba.controller;

import com.alibaba.annotation.SystemLog;
import com.alibaba.common.ResponseResult;
import com.alibaba.define.domain.vo.CategoryVO;
import com.alibaba.define.service.CategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author : hanyang
 * @date : 2023-10-30 23:21
 **/

@Slf4j
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Resource
    CategoryService categoryService;

    @GetMapping("/getCategoryList")
    @SystemLog(businessName = "查询文章分类")
    public ResponseResult<List<CategoryVO>> categoryName() {
        return categoryService.queryNameList();
    }

}
